/*
 *  All rights reserved 
 *  Naive Coders
 */
package com.naivecoders.refex.functions;

import com.naivecoders.refex.FunctionFactory;

/**
 *
 * @author Andrii_Butenko
 */
public class PrintFunction extends AbstractFunction {

    public PrintFunction(FunctionFactory origin) {
        super(origin);
    }

    @Override
    public AbstractFunction evaluate(ListFunction x) throws InvocationException {
        final AbstractFunction result = arg(x, 0);
        getOrigin().log(result.toString());
        return result;
    }
    
}
